/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package Domain;

import Adapter.DomainAdapter;
import be.ac.ulg.montefiore.run.jahmm.Hmm;
import be.ac.ulg.montefiore.run.jahmm.ObservationDiscrete;

/**
 *
 * @author Allen
 */
public class HmmStatic {
    public Output[] outputs = null;
    public State[] states = null;
    public Cluster cluster = null;
    public char[] price = null;
    public double[][] T = new double[3][3];
    public double[][] O = new double[3][3];
    public Hmm<ObservationDiscrete<Output>> hmm = null;

    public HmmStatic(){

    }

    public void setOutput(Output[] output){
        this.outputs = new Output[output.length];
        for(int i = 0; i < output.length; i ++){
            this.outputs[i] = output[i];
        }
    }
    
    public void setStates(State[] states){
        this.states = new State[states.length];
        for(int i = 0; i < states.length; i ++){
            this.states[i] = states[i];
        }
    }

    public void setPrice(char[] price){
        this.price = new char[states.length];
        for(int i = 0; i < price.length; i ++){
            this.price[i] = price[i];
        }
    }

    public void setCluster(Cluster cluster){
        this.cluster = cluster;
    }

    public void setHmm(Hmm<ObservationDiscrete<Output>> hmm){
        this.hmm = DomainAdapter.cloneHmm(hmm);
        DomainAdapter.toMatrix(hmm, T, O);
    }

    public void setMatrix(double[][] T, double[][] O){
        for(int i = 0; i < 3; i ++)
            for(int j = 0; j < 3; j ++){
                this.T[i][j] = T[i][j];
                this.O[i][j] = T[i][j];
            }
        
        this.hmm = DomainAdapter.toHmm(this.T, this.O);
    }

}
